package com.sims.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.sims.bean.Class;
import com.sims.bean.CourseChart;
import com.sims.dao.ICourseChartDAO;
import com.sims.util.Constant;
import com.sims.util.HttpSessionUtil;

public class CourseChartService {
	
	@Autowired
	ICourseChartDAO courseChartDAO;
	
	
	public Map<String, String> findCourseChart(List courseChartList) {
		Map<String, String> result = new HashMap<String, String>();
		
		List<CourseChart> list = courseChartDAO.findByCid(HttpSessionUtil.getUserClassId());
		
		for (CourseChart courseChart : list) {
			courseChartList.add(courseChart);
		}
		
		result.put(Constant.SUCCESS, null);
		return result;
	}
	
	
}
